package framework.base;

import framework.base.provider.DynamicUpdateProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;
import tk.mybatis.mapper.annotation.RegisterMapper;

@RegisterMapper
public interface DynamicUpdateMapper<T> {

    @UpdateProvider(type = DynamicUpdateProvider.class, method = "dynamicUpdateById")
    int dynamicUpdateById(T obj);

    @UpdateProvider(type = DynamicUpdateProvider.class, method = "dynamicUpdate")
    int dynamicUpdate(@Param("update") T update, @Param("where") T where);

}
